<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="dictGroupList" checkbox="false" fitColumns="true" title="补课申请审核" actionUrl="MakupLessonController.do?auditDatagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="10"></t:dgCol>
   <t:dgCol title="申请状态"  field="applyState.value"  hidden="true"  queryMode="single"  width="10"></t:dgCol>
   <t:dgCol title="申请状态"  field="applyStateParam"   hidden="true" query="true" replace="待审核_1,审核通过_2" queryMode="single"  width="10"></t:dgCol>
   <t:dgCol title="学期"   field="schedule.semester"  queryMode="single"  width="70"></t:dgCol>
   <t:dgCol title="周次"  field="schedule.weekNumber"  queryMode="single"  width="40"></t:dgCol> 
   <t:dgCol title="班级"  field="schedule.className"  queryMode="single"  width="100"></t:dgCol>
   <t:dgCol title="上课节次"  field="schedule.courseOrderName"  queryMode="single"  width="100"></t:dgCol>
   <t:dgCol title="实验课程"  field="schedule.lessonInfo.lessonName"   queryMode="single" query="true"  width="120"></t:dgCol>
   <t:dgCol title="实验项目"  field="schedule.teachItem.itemName"   queryMode="single"  query="true" width="120"></t:dgCol>
   <t:dgCol title="任课教师"  field="schedule.teacher.realName"   queryMode="single"  width="80"></t:dgCol>
   <t:dgCol title="实验室"  field="schedule.lab.name"   queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="房间"  field="schedule.lab.roomNo"   queryMode="single"  width="60"></t:dgCol>
   <t:dgCol title="申请人"  field="applyUser.realName"   queryMode="single"  width="80"></t:dgCol>
   <t:dgCol title="申请人班级"  field="auditContent"   queryMode="single"  width="80"></t:dgCol>
   <t:dgCol title="状态"  field="applyState.name"   formatterjs="getState" queryMode="single"  width="80"></t:dgCol>
   <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
   <t:dgFunOpt title="审核" funname="audit(id)" exp="applyState.value#eq#1"></t:dgFunOpt>
   </t:datagrid>
  </div>
 </div>
 <script type="text/javascript">
 $(document).ready(function(){
	 
 }); 
 function getState(v){
	 if(v == '初审通过'){
		 return '审核通过'
	 }
	 if(v =='初审不通过'){
		 return '审核不通过';
	 }
	 
	 return v;
 }
 
 function audit(id){
		var addurl = 'MakupLessonController.do?goAudit&id='+id;
		  $.dialog({
			  	id:'deviceReturn',
				content: 'url:'+addurl,
				lock : true,
				zIndex: 50, 
				width:400,
				height:200,
				title:'审批', 
				opacity : 0.3,
				ok: function(){
					iframe = this.iframe.contentWindow;
					$('#btn_sub', iframe.document).click(); 
	 				return false;
				},
				cache:false,
				close:reloadTable
		});
 } 
 
 </script>